package com.wodogs.utils.tools;

import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class CaptchaStore extends FileStore{
	
	public CaptchaStore(String platformName, String fileName) {
		super(platformName, fileName);
		setPerfix("png");
		setPath(getBaseDir()+PATH_SEPERATOR+"capatch");
	}

	public static Log logger = LogFactory.getLog(CaptchaStore.class);
	
	public void storePic(BufferedImage inputbig){
		try {
			ImageIO.write(inputbig, "png", getFile());
		} catch (IOException e) {
			e.printStackTrace();
			logger.error(e.getMessage(), e);
		}
	}
	

}
